<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/7/7
 * Time: 16:13
 */
require_once '../../include/common.inc.php';
require_once __DIR__ . '/../../FilterRequest.php';
checklogin();
$ac = $_GET['ac']??'0';
$ip = $_GET['ip'] ?? '0';
if ($ac == 'black') {
    FilterRequest::getInstance()->addBlackList($ip);
}
if ($ac == 'white') {
    FilterRequest::getInstance()->addWhiteList($ip);
}
if ($ac == 'delWhite') {
    FilterRequest::getInstance()->removeIpFromWhiteList($ip);
}
if ($ac == 'delBlack') {
    FilterRequest::getInstance()->removeIpFromBlackList($ip);
}

if ($ac == 'delIp') {
    FilterRequest::getInstance()->delIp($ip);
}


msg('修改成功','location="default.php"');